package com.commerceE.dao.impl;

import java.util.List;

import com.commerceE.common.dao.GenericIBatisDaoImpl;
import com.commerceE.common.search.ProductSearch;
import com.commerceE.dao.ProductDao;
import com.commerceE.domain.Products;
import com.commerceE.vo.ProductSearchVo;

public class ProductDaoImpl extends GenericIBatisDaoImpl<Products> implements
		ProductDao {

	@Override
	public String getNAMESPACE() {
		return Products.class.getName();
	}
	
	public List<Products> getProductList(){
		return getSqlSession().selectList(getNAMESPACE() +".selectAll");
	}
	
	public List<Products> getAllListOfProductByConditions(ProductSearchVo productSearchVo) {
		return getSqlSession().selectList(getNAMESPACE() +".getAllListOfProductByConditions",productSearchVo);
	}
	
	public List<Products> selectByExample(ProductSearch productSearch){
		return getSqlSession().selectList(getNAMESPACE() +".selectByExample",productSearch);
	}
	
	public int countByExample(ProductSearch productSearch){
		return getSqlSession().selectOne(getNAMESPACE() + ".countByExample",productSearch);
	}
	
}
